
<template name='score_record'>
<!-- 所有员工的删除操作日志	 -->
<view style="display: flex;    height: 100%;">
	<view class="box-infos font12  " >
		<view class="content-box">

				<!-- 列表区 -->
				<view class="boxsss" >
					<!-- 操作区 -->
					<view class="top-but search-box">
						<view class="caogao-but-box">
							<text selectable="true"  class="tipss">所有员工的删除操作日志</text>
							<view @click="$common.noMultipleClicks('GetData',GetData,0)" 
							class="rightButttom" >
								刷新
							</view>
						</view>
					</view>
					<!-- end -->
					<table v-if="resData.list &&  resData.list.length>0">
						<!-- 表头 -->
						<thead>
							<tr >
								<th  class="centers " style="min-width: 20px;">
									序号
								</th>
								<th  class="centers ">
									信息
								</th>
								<th  class=" ">
									时间
								</th>
							</tr>
						</thead>
						<tbody>
							<!-- 内容 -->
							<tr  
							:key="index" @click="TabcheckedIndex=index"
							v-for="(item,index) in resData.list" 
							:class="TabcheckedIndex == index ? 'goods-list-select':''"
							:style="(item.status==1||item.status==6) ?'color: #e40318;':''"
							>
								<td  class="centers ">
									{{index+1}}
								</td>
								<td class="">
									{{item.msg}}
								</td>
								<td >
									{{item.time}}
								</td>
							</tr>
						</tbody>
					</table>
					<!-- 暂无数据 -->
					<empty v-if="resData.list &&  resData.list.length==0"></empty>
					<!-- end -->
				</view>
				
				<!-- 分页 -->
				<pages
				:maxCount="page.maxCount"
				:nowPage="page.nowPage"
				:pageCount="page.pageCount"
				:pageList="page.pageList"
				:sum="page.sum"
				@updatePage="updatePage_duizhang"
				></pages>
				<!-- end -->
			
			<!-- end -->
		</view>
	</view>
</view>
</template>

<script>
	import pages from "@/components/admin-components/pages.vue"
	import empty from "@/components/admin-components/empty.vue"
	export default{
		name:'score_record',
		components: {
			empty,
			pages
		},
		data(){
			return{
				TabcheckedIndex:-1,//当前选中项
				pageSend:{//欲要传递到权限页面搜寻的内容
					id:'',//可能是user_id,goods_id
					name:''
				},
				page:{
					pageList:[],//页码数组
					nowPage:1,//当前页数
					pageCount:1,//总页数
					maxCount:0,
					sum:0,
					pageCounts:20,
				},
				resData:{
					list:[]
				},
			}
		},
		props: {
			OnPageUserId:{
				type: String|Number,
				default: 0
			},
		},
		created(){
			this.GetData(this.OnPageUserId);
		},
		methods:{
			
			/**
			 * 获取详细单据
			*/
			GetData(user_id){
				var that = this
				that.$common.get_request(
					{
						type:'get_delete_log',
						user_id:user_id,
						pages:this.page.nowPage,//当前位于页数
					},
					(res)=>{
						that.resData = res
						that.page.pageCount  = res.pageCount
						that.page.sum  = res.sum
						that.page.maxCount  = res.maxCount
					}
				);
			},
			
			/**
			 * 分页器回调
			*/
			updatePage_duizhang(pageName,pageList,pageCount){
				this.page.nowPage = pageName
				this.page.pageList = pageList
				this.page.pageCounts = pageCount
				this.GetData(false)
			},
		}
	}
</script>
<style>
</style>
